﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TJDevHouse.Starcraft.Game
{
	public class WalkTile : Tile
	{
		private bool _walkable;
		private bool _height;

		public WalkTile(Map map, int x, int y) : base(map, x, y) { }

		public WalkTile(Map map, int x, int y, bool walkable, bool height)
			: base(map, x, y)
		{
			_walkable = walkable;
			_height = height;
		}

		public override bool GetIsWalkable()
		{
			return _walkable;
		}

		public override bool GetHeight()
		{
			return _height;
		}

		public override bool GetIsBuildable()
		{
			return BuildTile.IsBuildable;
		}

		public override BuildTile GetBuildTile()
		{
			return Map.GetBuildTileAtWalkTileCoords(X, Y);
		}

		public override List<WalkTile> GetWalkTiles()
		{

			List<WalkTile> tiles = new List<WalkTile>();
			tiles.Add(this);
			return tiles;
		}

		public override void SetIsWalkable(bool walkable)
		{
			_walkable = walkable;
		}

		public override void SetHeight(bool height)
		{
			_height = height;
		}

		public override void SetIsBuildable(bool buildable)
		{
			throw new InvalidOperationException("Can not set buildable value at walk tile level");
		}
	}
}
